﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using hou_elearning.Entity;
using hou_elearning.Business;

public partial class Controls_ucGiangvientieubieu : System.Web.UI.UserControl
{
    NguoidungEntity oNguoidung = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            bindRpt();
        }
    }
    /*
     * Hiển thị danh sách giảng viên nổi bật
     */
    public void bindRpt()
    {
        List<NguoidungEntity> lstNguoidung = NguoidungBRL.GetTopByVote();
        rptGiangvien.DataSource = lstNguoidung;
        rptGiangvien.DataBind();
    }
    /* Người tạo: liemqv
     * Ngày tạo: 24/04/2012
     * */
    protected void rptGiangvien_ItemCreated(object sender, RepeaterItemEventArgs e)
    {
        try
        {
            oNguoidung = (NguoidungEntity)e.Item.DataItem;
            Image imgAnhthe = (Image)e.Item.FindControl("imgAnhthe");
            imgAnhthe.ImageUrl = "~/ShowImage.ashx?type=Nguoidung&id=" + oNguoidung.PK_iNguoidungID;
        }
        catch (Exception ex)
        {

        }
    }
}